package com.novax.ex.activity.open.api.inner;


import com.novax.ex.activity.open.model.query.OrderDistributionQuery;
import com.novax.ex.activity.open.model.request.IeoOrderUpdateRequest;
import com.novax.ex.activity.open.model.response.IeoDistributionResponse;
import com.novax.ex.common.results.ReturnResult;
import com.novax.ex.common.util.PageUtil;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

/**
 * Description: IEO-订单 后台
 *
 * @author shaw
 * @date 11/30/22 10:32
 */
@Tag(name = "IEO-订单 后台", description = "IEO-订单 后台")
@FeignClient(url = "${remote.activity-service.endpoint}", name = "IeoInnerOrderApi", contextId = "IeoInnerOrderApi")
@RequestMapping
public interface IeoInnerOrderApi {

    @Operation(summary = "用户订单得到数量修改")
    @PostMapping("/v3/private/orders")
    ReturnResult<?> modify(@RequestHeader("language") String language,
                        @RequestBody List<IeoOrderUpdateRequest> ieoOrderList);

    @Operation(summary = "发币(不分期)")
    @PostMapping("/v3/private/orders/unfree/{ieoId}")
    ReturnResult<?> unfree( @RequestHeader("uri") String uri,
                            @RequestHeader("language") String language,
                            @PathVariable("ieoId") Long ieoId);

    @Operation(summary = "发币(分期)")
    @PostMapping("/v3/private/orders/stages/{ieoId}")
    ReturnResult<?> stages( @RequestHeader("uri") String uri,
                            @RequestHeader("language") String language,
                            @PathVariable("ieoId") Long ieoId);

    @Operation(summary = "分期单期补偿")
    @PostMapping("/v3/private/reissue/{id}")
    ReturnResult<?> reissue( @RequestHeader("uri") String uri,
                            @RequestHeader("language") String language,
                            @PathVariable("id") Long id);

    @Operation(summary = "发放记录展示")
    @GetMapping("/v3/private/distribution")
    ReturnResult<PageUtil<IeoDistributionResponse>> distributionPage( @RequestHeader("language") String language,
                                                                      @ParameterObject OrderDistributionQuery query);

    @Operation(summary = "项目币种搜索下拉框")
    @GetMapping("/v3/private/query/box")
    ReturnResult<List<String>> queryBox(@RequestHeader("language") String language);
}